import request from '../../utils/Request'

export const saveRoom = data => {
    return request({
        method: 'post',
        url: '/api/distribution/room/save',
        data: data
    })
}

export const batchCreateRoom = data => {
    return request({
        method: 'post',
        url: '/api/distribution/room//batch/create',
        data: data
    })
}

export const deleteRoom = bId => {
    return request({
        method: 'get',
        url: '/api/distribution/room/delete/' + bId,
        params: {}
    })
}

export const selectRoom = bId => {
    return request({
        method: 'get',
        url: '/api/distribution/room/select' + bId
    })
}

export const listRoom = (data,current,size) => {
    return request({
        method: 'get',
        url: '/api/distribution/room/list',
        params: {data,current,size}
    })
}

export const listRoomByBuildingId = bid => {
    return request({
        method: 'get',
        url: '/api/distribution/room/list/building/' + bid,
        params: {}
    })
}


export const selectRoomByUserId = bid => {
    return request({
        method: 'get',
        url: '/api/distribution/room/select/user',
        params: {}
    })
}

export const batchBindRoomUser = data => {
    return request({
        method: 'post',
        url: '/api/distribution/room/batch/bind/user',
        data: data
    })
}

export const batchUnBindRoomUser = data =>{
    return request({
        method: "post",
        url: "/api/distribution/room/batch/unBind",
        data: data
    })
}



